﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NamTrungBS.DataLayer;


namespace NamTrungBS
{
    public partial class ThemMoi : DevComponents.DotNetBar.Office2007Form
    {
        public ChiTietHoaDon chitiet;

        //private int _masp;

        //public int Masp
        //{
        //    get { return _masp; }
        //    set { _masp = value; }
        //}
        //private string _tenSP;

        //public string TenSP
        //{
        //    get { return _tenSP; }
        //    set { _tenSP = value; }
        //}
        //private string _dvt;
        //public string DVT
        //{
        //    get { return _dvt; }
        //    set { _dvt = value; }
        //}
        //private Double _slMua = 0;

        //public Double SlMua
        //{
        //    get { return _slMua; }
        //    set { _slMua = value; }
        //}
        //private Double _donGia = 0;

        //public Double DonGia
        //{
        //    get { return _donGia; }
        //    set { _donGia = value; }
        //}
        //private Double _thanhTien;

        //public Double ThanhTien
        //{
        //    get { return _thanhTien; }
        //    set { _thanhTien = value; }
        //}
        
        public ThemMoi()
        {
            InitializeComponent();
        }
       
        public void btnThem_Click(object sender, EventArgs e)
        {
            double soluong=Double.Parse(txtSoLuongMua.Text);
            double dongia=Double.Parse(txtGia.Text);
            chitiet = new ChiTietHoaDon { 
               STT=0,
               TenSP=txtTenSP.Text,
               SoLuong=soluong,
               TonDau=0,
               DonGia=dongia,
               DVT=txtDVT.Text,
               ThanhTien=soluong*dongia
            };
            this.Dispose();
        }

        private void btnBoqua_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
